package kr.co.dayve.site.management.service;


import kr.co.dayve.site.domain.Comment;
import kr.co.dayve.site.domain.CommunityBoard;
import kr.co.dayve.site.domain.DayveFile;
import kr.co.dayve.site.management.dao.*;
import org.springframework.web.multipart.MultipartFile;

import java.io.*;
import java.util.List;
import java.util.UUID;

public class CommentServiceImpl implements CommentService{

    // Comment Service
    public List getCommentListByBoardNo(Comment comment){
        return commentDao.getCommentListByBoardNo(comment);
    }

    public String getTotalCountByNo(Comment comment){
        return commentDao.getTotalCountByBoardNo(comment);
    }

    public Comment getCommentByNo(String comment_no){
        return commentDao.getCommentByNo(comment_no);
    }

    public String writeComment(Comment comment){
        return commentDao.writeComment(comment);
    }

    public String updateComment(Comment comment){
        return commentDao.updateComment(comment);
    }

    public String deleteComment(Comment comment){
        return commentDao.deleteComment(comment);
    }


    ///////////////////////////////////////
	// Spring Framework Setter Injection //
	///////////////////////////////////////
    
    private CommentDao commentDao;
    private CommunityBoardDao communityBoardDao;

    public void setCommentDao(CommentDaoImpl commentDao) {
        this.commentDao = commentDao;
    }

    public void setCommunityBoardDao(CommunityBoardDaoImpl communityBoardDao) {
        this.communityBoardDao = communityBoardDao;
    }
}
